# Contributor: Francesco Colista <fcolista@alpinelinux.org>
# Maintainer: Francesco Colista <fcolista@alpinelinux.org>
pkgname=openvas-cli
pkgver=1.4.5
pkgrel=5
_pkgid=2397
pkgdesc="The OpenVAS Command-Line Interface"
url="http://www.openvas.org"
arch="all"
license="GPL"
makedepends="openvas-libraries-dev cmake doxygen xmltoman graphviz"
subpackages="$pkgname-doc"
source="http://wald.intevation.org/frs/download.php/$_pkgid/$pkgname-$pkgver.tar.gz
	001-fortify-source.patch"

builddir="$srcdir"/$pkgname-$pkgver

build() {
	cd "$builddir"
	cmake \
		-DCMAKE_BUILD_TYPE=None \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DSYSCONFDIR=/etc \
		-DLOCALSTATEDIR=/var .
	make
}

check() {
	cd "$builddir"
	make test
}

package() {
	cd "$builddir"
	make DESTDIR="$pkgdir/" install
}

sha512sums="35ec391d1e25bfe1a49507b9e2ec69243411a6e839232334bb0f2eed26750a159942b7d14528fab9e57e1c7d7bf40fa087686444168ced4e4281ad78f2aeae85  openvas-cli-1.4.5.tar.gz
979714b5625b87ec559be6d7520152c713b5455a401e50350b5c342b3769cfa83946a31dd963300cb0b0276fdc28f27ea66854563bec1a744322b6c268202935  001-fortify-source.patch"
